<%--
  Created by IntelliJ IDEA.
  User: 29265
  Date: 2024/6/4
  Time: 10:29
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<html>
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>学习页面</title>
    <style>
        body {
            font-family: Arial, sans-serif;
            background-color: #f2f2f2;
            margin: 0;
            padding: 0;
        }
        .container {
            max-width: 800px;
            margin: 20px auto;
            background-color: #fff;
            border-radius: 5px;
            padding: 20px;
            box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
        }
        h3 {
            color: #009688;
        }
        table {
            width: 100%;
            border-collapse: collapse;
            margin-top: 20px;
        }
        table, th, td {
            border: 1px solid #ddd;
        }
        th, td {
            padding: 12px;
            text-align: center;
        }
        tr:nth-child(even) {
            background-color: #f2f2f2;
        }
        .form-container {
            text-align: center;
            margin-bottom: 20px;
        }
        .form-container input[type="text"] {
            padding: 8px;
            margin: 0 5px;
        }
        .know {
            padding: 10px 20px;
            background-color: #4CAF50;
            border: none;
            color: #fff;
            cursor: pointer;
            border-radius: 3px;
        }
        .know:hover {
            background-color: #a3dba6;
        }
        .know.noKnow {
            background-color: #f44336;
        }
        .know.noKnow:hover {
            background-color: #a71717;
        }
        .action-links a {
            text-decoration: none;
            color: white;
            margin-right: 10px;
        }
        .action-links a:hover {
            text-decoration: underline;
        }
    </style>
</head>
<body>
<div class="container">
    <h3>学习记录</h3>
<div class="form-container">
    <table>
        <tr>
            <th>序号</th>
            <th>单词</th>
            <th>学习次数</th>
            <th>学习时间</th>
            <th>操作</th>
        </tr>
        <c:forEach items="${userDtoList}" var="users" varStatus="status">
            <tr>
                <td>${status.index + 1}</td>
            <%--
            <td>${users.id}</td>
            --%>
                <td>${users.word}</td>
                <td>${users.count}</td>
                <td>${users.time}</td>
                <td class="action-links">
                    <a href="StudyServlet?word=${users.word}&opsCode=know" class="know" style="text-decoration: none;">认识</a>
                    <a href="StudyServlet?&opsCode=noKnow" class="know noKnow" style="text-decoration: none;">不认识</a>
                </td>
            </tr>
        </c:forEach>
    </table>
</div>
</div>
</body>
</html>